---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/jesse/Dropbox/Ohio-HallResearch/Code/replication/table1.log
  log type:  text
 opened on:  11 Jun 2020, 09:03:49

. 
. ***** Descriptive statistics for county level analysis, presidential elections
. 
. use "$path/foreclosures_analysis.dta" if pres_vs != ., clear

. 
. sum foreclosure_rate

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
foreclosu~te |      9,541     1.26701    1.411012          0   19.96947

. local m1 = r(mean)

. local sd1 = r(sd)

. local min1 = r(min)

. local max1 = r(max)

. local n1 = r(N)

. 
. sum foreclosure_rate [aw=pop_y]

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
foreclosu~te |   9,541  1.1497e+09    1.604169   1.591581          0   19.96947

. local mw1 = r(mean)

. 
. // compute county-demeaned standard deviation
. egen mean_foreclosure_rate = mean(foreclosure_rate), by(fips)

. gen foreclosure_rate_demeaned = foreclosure_rate - mean_foreclosure_rate

. sum foreclosure_rate_demeaned

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
foreclosur~d |      9,541   -7.21e-10    .9318535  -9.699565   10.19275

. local dsd1 = r(sd)

. 
. sum pres_vs

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     pres_vs |      9,541    39.26044    15.04828   4.825737   95.74908

. local m2 = r(mean)

. local sd2 = r(sd)

. local min2 = r(min)

. local max2 = r(max)

. local n2 = r(N)

. 
. sum pres_vs [aw=pop_y]

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
     pres_vs |   9,541  1.1497e+09    52.27548   15.80778   4.825737   95.74908

. local mw2 = r(mean)

. 
. egen mean_pres_vs = mean(pres_vs), by(fips)

. gen pres_vs_demeaned = pres_vs - mean_pres_vs

. sum pres_vs_demeaned

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
pres_vs_de~d |      9,541   -2.77e-08    4.616765  -21.04391   24.47207

. local dsd2 = r(sd)

. 
. 
. sum pop_y

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       pop_y |      9,541    120497.3    354201.5     109.75   1.01e+07

. local m3 = r(mean)

. local sd3 = r(sd)

. local min3 = r(min)

. local max3 = r(max)

. local n3 = r(N)

. 
. // Descriptive statistics for county level analysis, legislative elections
. 
. use "$path/foreclosures_leg_analysis.dta" if cong_vs != . | sen_vs != ., clear

. 
. sum foreclosure_rate if cong_vs != .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
foreclo~rate |     18,187    1.292787     1.49512          0   21.94285

. local m4 = r(mean)

. local sd4 = r(sd)

. local min4 = r(min)

. local max4 = r(max)

. local n4 = r(N)

. 
. sum foreclosure_rate [aw=pop_y] if cong_vs != .

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
foreclo~rate |  18,187  2.2623e+09    1.614675   1.710078          0   21.94285

. local mw4 = r(mean)

. 
. egen mean_foreclosure_rate = mean(foreclosure_rate), by(fips)

. gen foreclosure_rate_demeaned = foreclosure_rate - mean_foreclosure_rate

. sum foreclosure_rate_demeaned

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
foreclosur~d |     18,291   -6.16e-10    1.044273  -12.93275   12.33925

. local dsd4 = r(sd)

. 
. sum sen_vs 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      sen_vs |     12,282    42.14229    19.13807          0        100

. local m5 = r(mean)

. local sd5 = r(sd)

. local min5 = r(min)

. local max5 = r(max)

. local n5 = r(N)

. 
. sum sen_vs [aw=pop_y]

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
      sen_vs |  12,282  1.4917e+09    53.39047   19.77427          0        100

. local mw5 = r(mean)

. 
. egen mean_sen_vs = mean(sen_vs), by(fips)
(11 missing values generated)

. gen sen_vs_demeaned = sen_vs - mean_sen_vs
(6,009 missing values generated)

. sum sen_vs_demeaned

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
sen_vs_dem~d |     12,282   -2.79e-08    12.07503  -70.04388   64.56754

. local dsd5 = r(sd)

. 
. sum cong_vs

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     cong_vs |     18,187    39.24655    21.93868          0        100

. local m6 = r(mean)

. local sd6 = r(sd)

. local min6 = r(min)

. local max6 = r(max)

. local n6 = r(N)

. 
. sum cong_vs [aw=pop_y]

    Variable |     Obs      Weight        Mean   Std. Dev.       Min        Max
-------------+-----------------------------------------------------------------
     cong_vs |  18,187  2.2623e+09    50.86578   21.19014          0        100

. local mw6 = r(mean)

. 
. egen mean_cong_vs = mean(cong_vs), by(fips)

. gen cong_vs_demeaned = cong_vs - mean_cong_vs
(104 missing values generated)

. sum cong_vs_demeaned

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
cong_vs_de~d |     18,187   -7.85e-09    13.10057  -66.18179   75.60013

. local dsd6 = r(sd)

. 
. sum pop_y if cong_vs != .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
       pop_y |     18,187    124393.2    361911.8         95   1.02e+07

. local m7 = r(mean)

. local sd7 = r(sd)

. local min7 = r(min)

. local max7 = r(max)

. local n7 = r(N)

. 
. log close
      name:  <unnamed>
       log:  /Users/jesse/Dropbox/Ohio-HallResearch/Code/replication/table1.log
  log type:  text
 closed on:  11 Jun 2020, 09:03:49
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
